package com.ruibo.modules.system.service.dto;

import java.io.Serializable;

import com.ruibo.jpa.model.AbstractAuditDto;

/**
 * (SysRole)实体类
 *
 * @author sunfeng
 * @since 2020-04-17 13:34:58
 */
public class SysRoleDto extends AbstractAuditDto implements Serializable {
    private static final long serialVersionUID = -39609085009777543L;

    private Long version;

    private String remark;

    private String roleName;

    private String roleKey;

    private Integer roleSort;


    private String status;

    private String delFlag;


    /** 角色组 */
    private Long[] deptIds;

    /** 岗位组 */
    private Long[] menuIds;

    /**
     * p判断是否是超级管理员
     * @return
     */
    public boolean isAdmin() {
        return isAdmin(this.getId());
    }

    public static boolean isAdmin(Long roleId) {
        return roleId != null && 1L == roleId;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleKey() {
        return roleKey;
    }

    public void setRoleKey(String roleKey) {
        this.roleKey = roleKey;
    }

    public Integer getRoleSort() {
        return roleSort;
    }

    public void setRoleSort(Integer roleSort) {
        this.roleSort = roleSort;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public Long[] getDeptIds() {
        return deptIds;
    }

    public void setDeptIds(Long[] deptIds) {
        this.deptIds = deptIds;
    }

    public Long[] getMenuIds() {
        return menuIds;
    }

    public void setMenuIds(Long[] menuIds) {
        this.menuIds = menuIds;
    }
}
